<template>
  <div>
    <van-button type="primary" size="small" @click="go">跳转</van-button>
  </div>
</template>

<script>
import {
  getCurrentInstance
} from 'vue';
export default {
  name: "temp",
  setup() {
    const { ctx } = getCurrentInstance();

    const go = () => {
      ctx.$router.push({
        path: "/cart"
      })
    }
    
    return {
      go
    }
  }
}
</script>